import BaseApi from '../BaseApi';

const controller = "/versionManage";
export default {

    addVersion(condition) {
        return this.requestPost(controller, "/addVersion", condition);
    },
    delVersion(condition) {
        return this.requestPost(controller, "/delVersion", condition);
    },
    editVersion(condition) {
        return this.requestPost(controller, "/editVersion", condition);
    },
    getVersionManageList(condition) {
        return this.requestPost(controller, "/getVersionManageList", condition);
    },

    batchUpdateDeviceVersion(condition) {
        return this.requestPost("/deviceVersion", "/batchUpdateDeviceLastVersion", condition);
    },


    /*请求封装*/
    requestPost(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestPost(newUrl, condition);

    }

    ,
    requestDownLoadGet(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestDownloadGet(newUrl, condition);
    }
}
